package com.sansecy.customview.activity;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

import com.sansecy.customview.R;
import com.sansecy.customview.view.calendar.MonthCalendarBottomBgView;
import com.sansecy.customview.view.calendar.bean.SignDateBean;

import java.util.ArrayList;

import static com.sansecy.customview.view.calendar.MonthCalendarBottomBgView.*;

import androidx.appcompat.app.AppCompatActivity;

public class MonthCalendarActivity extends AppCompatActivity {
    public static void start(Context context) {
        Intent starter = new Intent(context, MonthCalendarActivity.class);
        context.startActivity(starter);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_month_calendar);

        MonthCalendarBottomBgView MonthCalendarBottomBgView = findViewById(R.id.MonthCalendarBottomBgView);
        ArrayList<SignDateBean> dates = new ArrayList<>();
        dates.add(new SignDateBean(System.currentTimeMillis(), false));
        dates.add(new SignDateBean(System.currentTimeMillis() - oneDayTimestamps, false));
        dates.add(new SignDateBean(System.currentTimeMillis() - oneDayTimestamps * 2, false));
        dates.add(new SignDateBean(System.currentTimeMillis() - oneDayTimestamps * 3, true));
        dates.add(new SignDateBean(System.currentTimeMillis() - oneDayTimestamps * 4, true));
        dates.add(new SignDateBean(System.currentTimeMillis() - oneDayTimestamps * 5, true));
        dates.add(new SignDateBean(System.currentTimeMillis() - oneDayTimestamps * 6, false));
        dates.add(new SignDateBean(System.currentTimeMillis() - oneDayTimestamps * 7, false));
        dates.add(new SignDateBean(System.currentTimeMillis() - oneDayTimestamps * 8, true));
        dates.add(new SignDateBean(System.currentTimeMillis() - oneDayTimestamps * 9, true));
        dates.add(new SignDateBean(System.currentTimeMillis() - oneDayTimestamps * 10, false));
        dates.add(new SignDateBean(System.currentTimeMillis() - oneDayTimestamps * 11, true));
        dates.add(new SignDateBean(System.currentTimeMillis() - oneDayTimestamps * 12, true));

        MonthCalendarBottomBgView.setSignedDays(dates);
    }
}
